#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>     
#include <stdlib.h>//atoi
#include<math.h>
int my_atoi(char* p)
{
	int ret = 0;
	int cha = 0;
	while (*p)
	{
		if (*p ==' ')
			p++;
		else if (*p == '+' || *p == '-')
		{
			if (*p == '+')
				cha = 1;
			else
				cha = -1;
			p++;
			if (*p <= '9' && *p >= '0')
				break;
		}
		else
		{
			return 0;
		}
	}
	int count = 0;
	int num[100] = { 0 };
	while (*p && *p <= '9' && *p >= '0')
	{
		num[count] = *p-'0';
		count++;
		p++;
	}
	for (int i = 0; i < count; i++)
	{
		ret += num[i]*pow(10,count-i-1);
	}
	return ret*cha;
}
int main()
{
	char arr[100] = { 0 };
	scanf("%s", arr);
	printf("%d", my_atoi(arr));
	return 0;
}